package com.egg.mall.entity.category;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.egg.common.core.model.entity.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;


/**
 * <p>
 * 商品分类
 * </p>
 *
 * @author east
 * @since 2022-08-08
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName(value = "mall_category")
@ApiModel(value = "Category对象", description = "商品分类")
public class Category extends BaseEntity {


    @ApiModelProperty(value = "分类名称")
    @TableField(value = "name")
    private String name;

    @ApiModelProperty(value = "分类父级ID")
    @TableField(value = "pid")
    private Long pid;

    @ApiModelProperty(value = "层级")
    @TableField(value = "level")
    private Integer level;

    @ApiModelProperty(value = "图标地址")
    @TableField(value = "icon_url")
    private String iconUrl;

    @ApiModelProperty(value = "排序")
    @TableField(value = "sort")
    private Integer sort;

    @ApiModelProperty(value = "是否展示")
    @TableField(value = "visible")
    private Boolean visible;


}
